package enums;

/**
 * Describe
 *
 * @author maguangming
 * @since 2022/9/14 22:00
 */
public class PostOffice {
    enum MailHandler {

        ONE {
            public boolean handle(String str) {
                return str != null && str.length() == 1;
            }
        },
        TWO {
            @Override
            boolean handle(String str) {
                return str != null && str.length() == 2;
            }
        };
        abstract boolean handle(String str);
    }

    public static void main(String[] args) {
        System.out.println(MailHandler.ONE.handle(" "));
        System.out.println(MailHandler.TWO.handle("12"));

        switch (args[0]){
            case "" -> System.out.println("");
        }
    }
}
